<?
require_once("../config/dbconn.php");require_once("../config/powercls.php");

if($act=='set'){
	unset($dataArray);
	$dataArray["gppriceup"]=$_POST["gppriceup"];
	$dataArray["gpsalerate"]=$_POST["gpsalerate"];
	$dataArray["gpbuyrate"]=$_POST["gpbuyrate"];
	$dataArray["gpfax"]=$_POST["gpfax"];
	$dataArray["gphour"]=$_POST["gphour"];
	$dataArray["gpdai"]=$_POST["gpdai"];
	$dataArray["gprate"]=$_POST["gprate"];
	$dataArray["gpdai1"]=$_POST["gpdai1"];
	$dataArray["gprate1"]=$_POST["gprate1"];
	$dataArray["gpcgrate"]=$_POST["gpcgrate"];
	$dataArray["gpjjrate"]=$_POST["gpjjrate"];
	$dataArray["gpcurprice"]=$_POST["gpcurprice"];
	$dataArray["gp_lowertrade"]=$_POST["gp_lowertrade"];
	$dataArray["gp_pricelimit"]=$_POST["gp_pricelimit"];
	$dataArray["gp_traderate"]=$_POST["gp_traderate"];
	$dataArray["gp_pricerate"]=$_POST["gp_pricerate"];
	$dataArray["gp_pricerate1"]=$_POST["gp_pricerate1"];
	$dataArray["gp_scgupiaonum"]=$_POST["gp_scgupiaonum"];
	$dataArray["gp_zcgupiaosz"]=$_POST["gp_zcgupiaosz"];
	$dataArray["gp_zdcfgupiao"]=$_POST["gp_zdcfgupiao"];	
	$dataArray["gp_kpprice"]=$_POST["gp_kpprice"];
	$dataArray["gpsaleoutnum"]=$_POST["gpsaleoutnum"];
	$dataArray["gp_cantraderate"]=$_POST["gp_cantraderate"];
	$dataArray["gpysgnum"]=$_POST["gpysgnum"];
	$dataArray["gpsaleoutnum1"]=$_POST["gpsaleoutnum1"];
	$dataArray["closehygptrade"]=$_POST["closehygptrade"];
	$dataArray["ysgpricebz"]=$_POST["ysgpricebz"];
	$dataArray["chaigunum"]=$_POST["chaigunum"];
	$dataArray["gpsaleoutsy"]=$_POST["gpsaleoutsy"];
	
	$db->update("{$db_prefix}gupiaoset",$dataArray,"id=1");
	echo "<script>alert('已经更新');location.href='gupiao_set.php';</script>";exit();
}

$sql1="select * from {$db_prefix}gupiaoset where 1";
$rs1=$db->get_one($sql1);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	
}
-->
</style>

<link href="images/skin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td width="935" height="29" valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">报单币设定</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top">
		<form id="form1" name="form1" method="post" action="?act=set">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="3"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
                <tr>
                  <td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;</td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="30" colspan="3">
			  
			  <table width="100%" height="420" border="0" cellpadding="0" cellspacing="0">
			  	<tbody style="display:none">
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt"><p >报单币每涨
                     <label>
                     <input name="gppriceup" type="text" id="gppriceup" size="10" value="<?=$rs1['gppriceup']?>">
                     </label>
                     美金系统自动挂牌卖出
                     <input name="gpsalerate" type="text" id="gpsalerate" size="10" value="<?=$rs1['gpsalerate']?>">
                     %.卖出的其中
                     <input name="gpbuyrate" type="text" id="gpbuyrate" size="10" value="<?=$rs1['gpbuyrate']?>">
                     %用于当前价格回购</p></td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt"><p >
                     <input name="gphour" type="text" id="gphour" size="10" value="<?=$rs1['gphour']?>">
                     小时后没有提现或者其他处理，公司将以当前的价格自动回购到报单币市场.</p></td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt"><p >报单币交易
                     <input name="gpfax" type="text" id="gpfax" size="10" value="<?=$rs1['gpfax']?>">
                     %的手续费，
                     <label>
                     <input name="gpdai1" type="text" id="gpdai1" size="10" value="<?=$rs1['gpdai1']?>">
                     </label>
                     代
                     <input name="gprate1" type="text" id="gprate1" size="10" value="<?=$rs1['gprate1']?>">
                     %。</p></td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt"><p >开通一个慈善基金，每交易一笔就捐入
                     <input name="gpjjrate" type="text" id="gpjjrate" size="10" value="<?=$rs1['gpjjrate']?>">
                     %到慈善基金</p></td>
                 </tr>
				
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">报单币拆分后，系统全部自动挂牌卖出
                     <input name="gpcgrate" type="text" id="gpcgrate" size="10" value="<?=$rs1['gpcgrate']?>">
% </td>
                 </tr>
				  </tbody>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">交易价格不得高于或低于开盘价的
                     <input name="gp_pricelimit" type="text" id="gp_pricelimit" size="10" value="<?=$rs1['gp_pricelimit']?>">
                     %</td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">报单币最低交易数量
                     <input name="gp_lowertrade" type="text" id="gp_lowertrade" size="10" value="<?=$rs1['gp_lowertrade']?>">
                     股 </td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">报单币交易收取费用
                     <input name="gp_traderate" type="text" id="gp_traderate" size="10" value="<?=$rs1['gp_traderate']?>">
                     %</td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">会员每天只可卖出
                     <input name="gp_cantraderate" type="text" id="gp_cantraderate" size="10" value="<?=$rs1['gp_cantraderate']?>">
                     %的可交易股</td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">报单币交易金额
                     <input name="gp_pricerate" type="text" id="gp_pricerate" size="10" value="<?=$rs1['gp_pricerate']?>">
                     %进入报单币钱包。
                     <input name="gp_pricerate1" type="text" id="gp_pricerate1" size="10" value="<?=$rs1['gp_pricerate1']?>">
                     %进入 奖金币钱包。推荐人获取
                     <label>
                     <input name="gpdai" type="text" id="gpdai" size="5" value="<?=$rs1['gpdai']?>">
                     </label>
                     代
                     <input name="gprate" type="text" id="gprate" size="5" value="<?=$rs1['gprate']?>">
                     %</td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">每售出
                     <input name="gp_scgupiaonum" type="text" id="gp_scgupiaonum" value="<?=$rs1['gp_scgupiaonum']?>" size="5">
股报单币价上涨幅度0.0001美金</td>
                 </tr>
                  <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">每注册一人报单币价上涨幅度<input name="gp_zcgupiaosz" type="text" id="gp_zcgupiaosz" value="<?=$rs1['gp_zcgupiaosz']?>" size="5">美金</td>
                 </tr>
                  <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">股票面值<input name="gp_zdcfgupiao" type="text" id="gp_zdcfgupiao" value="<?=$rs1['gp_zdcfgupiao']?>" size="5">美金时自动拆分，填0不自动拆分</td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt">报单币当前价格
                     <input name="gpcurprice" type="text" id="gpcurprice" size="10" value="<?=$rs1['gpcurprice']?>">美金
。报单币开盘价格
<input name="gp_kpprice" type="text" id="gp_kpprice" size="10" value="<?=$rs1['gp_kpprice']?>">美金。
                   刚开盘的时候,<span class="STYLE1">当前价格与开盘价格必须一致</span></td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt"><label>
                     <input name="closehygptrade" type="checkbox" id="closehygptrade" value="1" <? if($rs1['closehygptrade']==1) echo "checked"?>>
                   </label>
                     关闭会员之间的交易。原始股价格以
                     <label>
                     <select name="ysgpricebz" id="ysgpricebz">
					 <option value="1" <? if ($rs1['ysgpricebz']==1) echo "selected"?>>开盘价格</option>
					 <option value="2" <? if ($rs1['ysgpricebz']==2) echo "selected"?>>当前价格</option>
                     </select>
                     为
                     </label>
                     标准</td>
                 </tr>
                 <tr>
                   <td height="30" align="left" bgcolor="#FFFFFF" class="left_txt"><p > 原始股报单币交易量
                       <label>
                     <input type="text" name="gpsaleoutnum" size="10" value="<?=$rs1['gpsaleoutnum']?>">
                     </label>
                   股。原始股数量
                   <label>
                   <input type="text" name="gpysgnum" size="10" value="<?=$rs1['gpysgnum']?>">
                   </label>
股。股票交易总数
                       <label>
                       <input name="gpsaleoutnum1" type="text" id="gpsaleoutnum1" value="<?=$rs1['gpsaleoutnum1']?>" size="10">
                       </label>
股。系统拆股次数
                       <label>
                       <input name="chaigunum" type="text" id="chaigunum" value="<?=$rs1['chaigunum']?>" size="10">
                       </label>
次。股票剩余
                   <label>
                   <input type="text" name="gpsaleoutsy" size="10" value="<?=$rs1['gpsaleoutsy']?>">
                   </label>
股</p></td>
                 </tr>
              </table></td>
            </tr>
            <tr>
              <td height="30" align="right">&nbsp;</td>
              <td height="30" align="right">&nbsp;</td>
              <td height="30">&nbsp;</td>
            </tr>
            <tr>
              <td width="50%" height="30" align="right"><input type="submit" value="确定" name="B1" /></td>
              <td width="6%" height="30" align="right">&nbsp;</td>
              <td width="44%" height="30"><input type="reset" value="取消设置" name="B12" /></td>
            </tr>
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
          </table>
		  </form>
		  </td>
      </tr>
    </table></td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>

</body>
</html>